/**
 * Copyright 2007 American Well Systems
 * All rights reserved.
 *
 * It is illegal to use, reproduce or distribute
 * any part of this Intellectual Property without
 * prior written authorization from American Well.
 */
package org.windowkit.toolkit.widget.table.render;

import java.awt.Component;

import javax.swing.JLabel;
import javax.swing.JTable;
import javax.swing.table.TableCellRenderer;

/**
 * Renders blank cells. Used by the table to render blank rows.
 */
public class BlankRenderer extends JLabel implements TableCellRenderer {

	private static final long serialVersionUID = 6539853309149237666L;

	/**
	 * Constructor.
	 */
	public BlankRenderer() {
		setText("");
	}

	/**
	 * {@inheritDoc}
	 */
	public Component getTableCellRendererComponent(final JTable table, final Object value,
			final boolean isSelected, final boolean hasFocus, final int row, final int column) {
		setForeground(table.getForeground());
		setBackground(table.getBackground());
		return this;
	}

}